package xyz.xmh.pattern.behavioral.commandpattern;

/**
 * @author Administrator
 * 实现Order接口的买实体类
 */
public class BuyStock implements Order {

    private final Stock absStock;

    public BuyStock(Stock absStock) {
        this.absStock = absStock;
    }

    @Override
    public void execute() {
        absStock.buy();
    }
}
